package com.ranyk.www.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * CLASS_NAME: UserRole.java <br/>
 *
 * @author ranyk           <br/>
 * @version V1.0           <br/>
 * @decription: cms_user_role 数据表实体类  <br/>
 * @date: 2022-04-03 <br/>
 */
@Data
@TableName("cms_user_role")
@EqualsAndHashCode(callSuper = true)
public class UserRole extends Model<UserRole> {


	@Serial
	private static final long serialVersionUID = -7717633712812733058L;

	/**
     * 用户角色ID
     */
	@TableId(value="user_role_id", type= IdType.AUTO)
	private Long userRoleId;
    /**
     * 角色ID
     */
	@TableField("role_id")
	private Long roleId;
    /**
     * 管理员ID
     */
	@TableField("user_id")
	private Long userId;
    /**
     * 创建时间
     */
	@TableField("create_time")
	private Date createTime;
    /**
     * 创建者
     */
	@TableField("create_by")
	private String createBy;


	@Override
	public Serializable pkVal() {
		return this.userRoleId;
	}

}
